import Numstatus,{ stateType } from '@/store/Numstatus/state'
import { Button } from 'antd'
import React from 'react'
import { useSelector,useDispatch } from 'react-redux'
const About: React.FC = () => {
  const dispatch = useDispatch()
  const state:stateType = useSelector((state: RootState) => state.Numstatus_reducer)
  const changeNum = (n:number) => {
    // dispatch({type:Numstatus.ADD1,n:n})
    // dispatch({type:Numstatus.ADD2,n:n})

    // dispatch<any>((dispatch:any) =>{
    //   setTimeout(()=>{
    //     dispatch({type:Numstatus.actionsName.add1})
    //   },1000)
    // })
    dispatch<any>(Numstatus.asyncAction.async_add1)
  }
  return (
    <>
      <div>News</div>
      <div>{state.num}</div>
      <Button onClick={() =>{changeNum(10)}}>1123</Button>
    </>

  )
}

export default About